If Branch Element
Use
If Branch Elements to introduce
IF and
IF NOT statements into your Campaign logic to split a single Campaign phase into two paths.
If a specified statement is true then recipients will be directed along one path, and if it is not true then the recipient will be directed on another. The split is defined by a Segment or series of Segments, resulting in a 'true' output and a 'false' output.
If Branch elements can also be used in conjunction with
variables to specify what treatments a particular recipient will receive as they pass through the element based on a defined set of criteria.
How you can use If Branch elements
Example 1 - you may want to split the audience depending on their contact preferences. If they agree to be contacted via email, send them to the email phase of the campaign. If they do not want to be contacted, you may want to communicate with them in a different way, or not at all.
Example 2 - in an engagement style campaign, use If Branch to identify whether recipients have made a purchase in the last month. If they have you send them an email with related products, and if they haven’t you send them some special offers to re-engage them with your brand.
You can only add audience segments to the 'true' branch of an If Branch element (represented by the green plus on the edge of the element).
All recipients that do not meet the criteria specified in the 'true' branch will move to the 'false' branch (represented by the red plus on the element edge).
Procedure
- Open a campaign or create a new campaign in Campaign Designer. Click the plus button on the edge of the element you want to add the If Branch element to (the plus button can be blue
, red or green ).
- Select the If Branch option from the drop-down list.
- To set up the If Branch, click the If Branch element.
- In the 'true' section of the slide-out pane that opens, click the green plus button
.
- Click Select existing segment if you want to select an existing audience segment. The Segment Library opens. Click the Select button next to the segment you want to add to the audience. If the segment is not a Master Segment, a copy of that segment is added to the campaign and can be edited. Master Segments cannot be edited from within campaigns.
Note: |
Segments are connected with OR in an If Branch. For example, if you have one segment specifying all 19 year olds and a second segment specifying all females in an If Branch, the resulting audience would be all 19 year olds and all females, not all 19 year old females.
|
- Click Build segment from the drop-down list if you want to build a new segment. The Campaign Designer screen opens.
Building Segments
Procedure
First you need to select the database table that the segment is based on, this is called the Resolution Level. For example, do you want to create a segment of Customers, Orders, Households, etc.? From the Select Table drop-down, select the resolution level table for the segment. You can either navigate to the table or you can search for it by clicking the search icon, alternatively drag the required table from the Data Tree in the left hand pane..
- Click the Select button.
After you have selected your database table, the segment is locked to that datasource and you can't use columns from other datasources in the Segment rules, as they are not linked to the selected table. For more information, see 'Resolution Levels'.
Select an operator to specify how the rules are connected:
Include if All
|
Include defines that the result of the rules or groups at the document level will be included in the final document result. The All defines an AND operator for combining the rules or groups that are at the document level. |
For example, having two rules in the document of Gender=F AND Age=30 will return in the result all females that are 30 years old. This result will be Included in the final result of the document. |
Include if Any
|
Include defines that the result of the rules or groups at the document level will be included in the final document result. The Any defines an OR operator for combining the rules or groups that are at the document level. |
For example, having two rules of Gender=F OR Age=30 will return in the result all females along with all 30 year olds, which at this point will contain males. This result will be Included in the final result of the document. |
- To add a rule or group to the Segment, you can either click the Add
icon and select Add Rule or Add Group from the drop-down list or to create a Group, drag a Table object from the Date Tree, which will create a Group resolved at that table level and to create a rule, drag the column from the Data Tree. The Value Picker at the bottom of the Data Tree pane can be sued to create a pre-populated rule based on one or more selected values. Note that this will default to an "equals" operator which can then be edited in-line
- Rules - a single rule is a column and value combination that identifies the people you will either include or exclude from the segment based on the operator used i.e. Equal to, Not equal to. The database columns available for a rule are determined by the top resolution level table.
- Groups - a group is a sub-branch of the calculation that can have a different resolution level and a different group operator to the top resolution level table. These are very powerful tool in segment creation. For example, your document could count Customers, but you could use a group to create a list of product orders (with the group resolved to your ORDER table) based on a variety of criteria which would combine those Orders together in a query, prior to resolving to the Customer level. You may wish to see Customers who placed orders in a certain month using a certain payment type. This would require an Order level group to AND those orders together so when embedded within a Customer level segment document, will display Customers who placed an order meeting those criteria. A Group has an extended set of options for how the rules within that group will be applied within the context of the document. The table below outlines how the group level options function within the context of the segment document.
Include if All
|
Include on a group defines that the final result of this group will be included in the final result of the document. The All defines an AND operator for combining the rules or groups that are inside this group. |
For example, having two rules in this group of Gender=F AND Age=30 will return all females that are 30 years old , and the Include defines that the result of this group will include all females that are 30 years old in the document as a whole (or in the groups parent object) |
Include if Any
|
Include on a group defines that the final result of this group will be included in the final result of the document. The Any defines an OR operator for combining the rules or groups that are inside this group. |
For example, having two rules in this group of Gender=F OR Age=30 will return all females, along with all 30 year olds (which at this point will include males), and the Includedefines that the result of this group will include all females, along with all 30 year olds, in the document as a whole (or in the groups parent object). |
Exclude if All
|
Exclude on a group defines that the final result of this group will be excluded in the final result of the document. The All defines an AND operator for combining the rules or groups that are inside this group. |
For example, having two rules in this group of Gender=F AND Age=30 will return all females that are 30 years old, but the Exclude defines that the result of the group will exclude all females that are 30 years old in the document as a whole (or in the groups parent object). |
Exclude if Any
|
Exclude on a group defines that the final result of this group will be excluded in the final result of the document. The Any defines an OR operator for combining the rules or groups that are inside this group. |
For example, having two rules in this group of Gender=F OR Age=30 will return all females, along with all 30 year olds (which at this point will include males), but the Exclude defines that the result of the group will exclude all females that are 30 years old in the document as a whole (or in the groups parent object). |
- When creating a rule definition, either drag the column or values from the Data Tree view or select the database column for the rule from the Select Column drop-down. You can navigate to the column or you can search for it by clicking the search
icon. Click the Select button. An icon will display the data type of the column selected
- Select the inclusion criteria desired for the query. Note than some criteria operators are not useful or relevant for particular data types, so the inclusion criteria displayed depend on the column’s data type, and will be a sub-set of the options in the table below. For this Display TEXT and UNICODE TEXT are both displayed as TEXT type.
Equal to |
Returns records that meet the specified value. Valid and available for all data types. |
Not equal to |
Returns records that do not meet the specified value. Valid and available for all data types. |
Between |
Returns records based on a range of values. Available for all Data Types except TEXT or UNICODE TEXT where Between is not supported. |
Contains |
Returns records that contain the specified text string (case-sensitive). Only available on TEXT/UNICODE TEXT data types. |
Does not contain |
Returns records that do not contain the specified text string (case-sensitive). Only available on TEXT/UNICODE TEXT data types. |
Greater than |
Returns records with a value greater than the one specified. Available for all Data Types except TEXT or UNICODE TEXT where Greater than is not supported. |
Greater than or equal to |
Returns records with a value equal to or greater than the one specified. Available for all Data Types except TEXT or UNICODE TEXT where Greater than or equal to is not supported. |
Less than |
Returns records with a value less than the one specified. Available for all Data Types except TEXT or UNICODE TEXT where Less than or equal to is not supported. |
Less than or equal to |
Returns records with a value equal to or less than the one specified. Available for all Data Types except TEXT or UNICODE TEXT where Less than or equal to is not supported. |
Has no value |
Returns all records for which there is no value. For example, if applied to the Income field, the records returned will be for customers who have not provided their income details. Available on all data types |
Has a value |
Returns all records for which there is a value. For example, if applied to the Income field, the records returned will be for customers who have provided their income details. Available on all Data types |
Before |
Returns all records, for Date, Time and DateTime columns where the records are before the specified value, and only supported on those data types. |
After |
Returns all records, for Date, Time and DateTime columns where the records are after the specified value, and only supported on those data types. |
Number Days Before
Number Days After
|
A special inclusion criteria for Date and DateTime columns.
Provides the ability to set inclusion rules based on the value in the Date column being a number of days to or from Today. The UI then allows further criteria operates of:
- Equal to
- Not equal to
- Greater than
- Greater than or equal to
- Less than
- Less than or equal to
Example 1 - if the column selected is a Contract End Date, the inclusion criteria chosen is Number Days After (Today), and the operator is Less than 7, the included rows would be those with a Contract End Date that is less than 7 days after today i.e. in the next 7 days.
Example 2 - if the column selected is Last Transaction Date, the inclusion criteria chosen is Number Days Before (Today), and the operator is Less than 7, the included rows would be those with a Last Transaction Date that is less than 7 days before today i.e. they had a transaction in the last 7 days.
NOTES:
- These queries will no longer accept negative values. Any negative values will now return zero rows.
|
Days to Anniversary From
Days since Anniversary From
|
A special inclusion criteria for Date and DateTime columns.
Provides the ability to set inclusion rules based on the anniversary of the value in the Date column being a number of days to or since Today. The UI then allows further criteria operates of:
- Equal to
- Not equal to
- Greater than
- Greater than or equal to
- Less than
- Less than or equal to
Example 1 - if the column selected is a Customer Joined Date, the inclusion criteria chosen is Number Days After (Today), and the operator is Less than 7, the included rows would be those with an anniversary of their Customer Joined Date, that is less than 7 days after today i.e. in the next 7 days.
Example 2 - if the column selected is Customer Joined Date, the inclusion criteria chosen is Number Days Before (Today), and the operator is Less than 7, the included rows would be those with an anniversary of their Customer Joined Date that is less than 7 days before today i.e. in the last 7 days.
NOTES:
- These queries will no longer accept negative values. Any negative values will now return zero rows.
- Due to the anniversary nature of these queries, these will not return records when querying over 364 days
|
- Select the values for the contents of the column. Click the value picker
icon to view the values available for the column and the counts for each value. Click the x in the value picker field to clear the contents.
note this display is dependent on index properties n a column which are set by the administrator and cannot be changed at this time. If value are not available, a suitable message will display.
- Enter values either manually or by selecting them from the value picker.
Note: |
Values entered manually are case sensitive. For example, for a Country column, 'Switzerland' will return results, whereas 'switzerland' will not. When the Select Value field contains a value, it has a colored background:
Grey box validation |
The format of the value is valid and there are matching values in the database.
|
Red Box validation |
The format of the value is not valid, for example text in a numeric column. The Calculate segment button is disabled when the format is not valid.
|
|
Nulls - if you want to select columns that contain no value, use the Has no value option to specify null.
Value blue bars - the value picker displays available values and their respective counts, along with blue bars that represent the frequency of that value relative to the size of the table. The counts and the blue bars will reflect the selected operator. For example, in the Age column, the counts and blue bars will change if you first select the Equal operator (all age values displayed) and then select the Greater than operator (only values greater than your selected value are displayed).
If you want to view records that are currently selected in a rule, group or segment, click the Record Viewer icon. Record Viewers are only active when the counts have been refreshed.
See 'Record Viewer' for more information.
- Click the Calculate segment button
at the top of the screen to verify that your selected criteria return results that you expect. The button is blue available when a segment in ready for calculation.
Note: |
Counts are not saved in a document as each time the document is executed is is done against the current instance of the database. |
- When you have finished creating the segment, it can be saved and closed.
- You can also add a description of the document. If you want to change the description at any time, click Settings at the top of the Segment Builder screen, enter your new description and click Apply.
- If you want to save the document as a Master Segment, click the Master Segment check box at the bottom of the save dialog. If you do not see the Master Segment check box, you do not have permission to create Master Segments.
Note: |
Segments are connected with OR in an If Branch. For example, if you have one segment specifying all 19 year olds and a second segment specifying all females in an If Branch, the resulting audience would be all 19 year olds and all females, not all 19 year old females.
|
- Click the Calculate button
to verify that your selected criteria return results that you expect. The button is blue when you create a new segment, open an existing segment, change the segment rules, or the data has changed. This indicates that the counts are not up-to-date (or have never been calculated if the segment is new), and you should recalculate the segment counts. When you calculate in an If Branch element, it is always against the audience specified in the campaign's Audience element, not the whole database.
Note: |
If the Calculate button is gray, the count currently shown is up-to-date.
|
- To view the records that are currently in your 'true' branch or 'false' branch, click the Record Viewer icon
.
See the Record Viewer topic for further information.
|
|